@ECHO OFF

IF NOT EXIST %DS_for_Formula%\INC\*.* GOTO DS_for_FormulaVARERROR
IF EXIST INC\*.INC GOTO NOCOPYINC
MD INC
COPY %DS_for_Formula%\INC\*.* INC >REPORT.CPY
:NOCOPYINC

IF NOT EXIST %DS_for_Formula%\LIB\*.* GOTO DS_for_FormulaVARERROR
IF EXIST LIB\*.LIB GOTO NOCOPYLIB
MD LIB
COPY %DS_for_Formula%\LIB\*.* LIB >REPORT.CPY
:NOCOPYLIB

GOTO OUT

:DS_for_FormulaVARERROR
ECHO ************* PLEASE CONTROL DS_for_Formula ENVIRONMENT VARIABLE  *************

:OUT
IF EXIST REPORT.CPY DEL REPORT.CPY

cd %1

putdate.exe

IF EXIST DS_OUT.COM DEL DS_OUT.COM
IF EXIST DS_OUT.HEX DEL DS_OUT.HEX

IF EXIST DS_OUT.ABS DEL DS_OUT.ABS
IF EXIST DS_OUT.B0* DEL DS_OUT.B0*
IF EXIST DS_OUT.H0* DEL DS_OUT.H0*

CD..
